package com.alex.insistence.web.cgform.banner.service;

import java.util.List;

import org.jeecgframework.core.common.service.CommonService;

import com.alex.insistence.web.cgform.banner.entity.BannerEntity;
import com.alex.insistence.web.cgform.banner.entity.BannerItemEntity;

public interface BannerServiceI extends CommonService {

  public <T> void delete(T entity);

  /**
   * 添加一对多
   * 
   */
  public void addMain(BannerEntity banner, List<BannerItemEntity> bannerItemList);

  /**
   * 修改一对多
   * 
   */
  public void updateMain(BannerEntity banner, List<BannerItemEntity> bannerItemList);

  public void delMain(BannerEntity banner);

  /**
   * 默认按钮-sql增强-新增操作
   * 
   * @param id
   * @return
   */
  public boolean doAddSql(BannerEntity t);

  /**
   * 默认按钮-sql增强-更新操作
   * 
   * @param id
   * @return
   */
  public boolean doUpdateSql(BannerEntity t);

  /**
   * 默认按钮-sql增强-删除操作
   * 
   * @param id
   * @return
   */
  public boolean doDelSql(BannerEntity t);

  /**
   * 通过appId和type获取Banner
   * 
   * @param appId
   * @param type
   */
  BannerEntity getAppBannerByType(String appId, String type);

}
